<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="../../utils/vue.js"></script>
</head>
<body>
    最先发生捕获事件，然后事件冒泡，因为span元素捕获事件之前已发生，所以冒泡时就不发生该事件。
    <div id="app" @click.prevent="clickme">
        <section id="section" @click.stop="clickme">
            <div id="div" @click.self="clickme">
                <span id="span" @click.capture="clickme">
                    <p id="p" @click.once="clickme">
                        用鼠标多次点击我，看看事件的传递真正顺序。
                    </p>
                </span>
            </div>
        </section>
        点击事件的响应顺序如下：{{message}}
    </div>
    <script>
        var vm = new Vue({
            el: '#app',
            data: {
                message: ''
            },
            methods: {
                clickme: function (event) {
                    if (this.message === '') {
                        this.message = event.currentTarget.id
                    } else {
                        this.message = this.message + '->' + event.currentTarget.id
                    }
                }
            }
        })
    </script>
</body>
</html>